feat: top-K winner-takes-most merge prediction rewards#292
Merged
anderdc merged 3 commits intoentrius:testfrom Mar 17, 2026
Merged
feat: top-K winner-takes-most merge prediction rewards#292anderdc merged 3 commits intoentrius:testfrom
anderdc merged 3 commits intoentrius:testfrom
Conversation
…re (50/35/15 split)
Contributor
Author
|
@anderdc Could you pls review this PR? |
anderdc
approved these changes
Mar 17, 2026
anderdc
added a commit
that referenced
this pull request
Mar 17, 2026
Co-authored-by: Ander <61125407+anderdc@users.noreply.github.com>
Contributor
Author
|
thanks @anderdc |
anderdc
added a commit
that referenced
this pull request
Mar 17, 2026
Co-authored-by: Ander <61125407+anderdc@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PREDICTIONS_TOP_KandPREDICTIONS_TOP_K_SHARESconstants to configure the distributionrounds(more settled issues = higher rank); unallocated shares when fewer than 3 eligible miners are not redistributedChanges
gittensor/constants.py— addedPREDICTIONS_TOP_K = 3andPREDICTIONS_TOP_K_SHARES = [0.50, 0.35, 0.15]gittensor/validator/forward.py— rewrotebuild_prediction_ema_rewards()to rank miners by(ema_score, rounds)descending and award only top-K with fixed sharestests/validator/merge_predictions/test_merge_predictions.py— added 8 tests covering standard split, edge cases (fewer miners, ties, deregistered miners, empty EMA), and total reward captests/validator/test_emission_shares.py— added guard-rail tests for top-K shares summing to 1.0 and length matchingPREDICTIONS_TOP_KTest plan
pytest tests/validator/test_emission_shares.py -v— constant guard-rails passpytest tests/validator/merge_predictions/test_merge_predictions.py -v— all 8 top-K reward distribution tests passCloses #289